import { getUrl, putUrl } from '../utils/http/htpp'
// 获取患者档案
export const getRecord = () => {
        return getUrl('/v1/record/' + localStorage.getItem('patient_id'))
    }
    // 患者端获取患者信息
export const getSelf = () => {
    return getUrl('/v1/user', {
        params: {
            _id: localStorage.getItem('patient_id')
        }
    })
}

// 医生端获取信息
export const getDSelf = () => {
    return getUrl('/v1/user', {
        params: {
            _id: localStorage.getItem('doctor_id')
        }
    })
}

// 医生端获取患者基本信息
export const getPUser = (data) => {
    return getUrl('/v1/user', {
        params: {
            ...data
        }
    })
}

// 修改患者档案
export const updateRecord = (data) => {
        return putUrl('/v1/record/' + localStorage.getItem('patient_id'), {...data })
    }
    // 患者端获取医生基本信息
export const getDoctorInfo = (id) => {
    return getUrl('/v1/user', {
        params: {
            _id: id
        }
    })
}

// 医生端获取会诊患者信息
export const getDRecord = (data) => {
    return getUrl('/v1/record', {
        params: {
            ...data
        }
    })
}